use serde::{Deserialize, Serialize};


//构建请求体
#[derive(Serialize, Deserialize, Debug)]
pub struct PredictRequest{
    pub request_id: String,
    pub roi: Vec<Vec<i32>>,
    pub image:String,
}

// 构建推理返回结构
#[derive(Serialize, Deserialize, Debug)]
pub struct PredictResult{
    pub request_id: String,
    pub objs: Option<Vec<PredictObject>>,
}

#[derive(Serialize, Deserialize, Debug)]
pub struct PredictObject{
    pub class_name: String,
    pub class_id: i32,
    pub conf: f32,
    pub position: Vec<i32>,
}